import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.SWT;

public class LoginBox
{

    public LoginBox(Shell s)
    {
        shell = new Shell(s, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
        loginL = new Label(shell, SWT.NATIVE);
        passL = new Label(shell, SWT.NATIVE);
        login = new Text(shell, SWT.BORDER);
        password = new Text(shell, SWT.BORDER | SWT.PASSWORD);
        remember = new Button(shell, SWT.CHECK);
        okay = new Button(shell, SWT.PUSH);
        cancel = new Button(shell, SWT.PUSH);

        loginL.setBounds(20,20,60,25);
        loginL.setText("login:");

        login.setBounds(80,20,300,25);
        login.setEditable(true);

        passL.setBounds(20,55,60,25);
        passL.setText("password:");

        password.setBounds(80,55,300,25);
        password.setEditable(true);

        remember.setBounds(80,90,200,25);
        remember.setText("remember");

        okay.setText("send");
        okay.setBounds(250,120,50,30);

        cancel.setText("cancel");
        cancel.setBounds(330,120,50,30);

        shell.setDefaultButton(okay);

        shell.setText("send email");
        shell.setMinimumSize(420, 200);
        shell.pack();
        shell.setVisible(true);
    }

    private Shell shell;
    private Label loginL, passL;
    private Text login, password;
    private Button remember, okay, cancel;
}
